﻿#define _CRT_SECURE_NO_WARNINGS 1

//编程初学者入门训练第九十七题
//BC99 序列中整数去重
//https://www.nowcoder.com/practice/6564a2f6e70f4153ad1ffd58b2b28490?tpId=107&tqId=33380&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3Fpage%3D2%26tpId%3D107%26type%3D107&difficulty=undefined&judgeStatus=undefined&tags=&title=

#include <stdio.h>

int main() {
    int n = 0;
    int arr1[1000] = { 0 };
    scanf("%d", &n);

    for (int i = 0; i < n; i++) {
        scanf("%d", &arr1[i]);
    }
    //去重
    //思路：两个指针操作同一个数组
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < i; j++) {
            if (arr1[i] == arr1[j]) {
                arr1[i] = 0;
            }
        }
    }

    for (int i = 0; i < n; i++) {
        if (arr1[i])
            printf("%d ", arr1[i]);
    }

    return 0;
}